babl: make TRCs internal API
authorØyvind Kolås <pippin@gimp.org>
Sun, 3 Sep 2017 16:27:49 +0000 (18:27 +0200)
committerØyvind Kolås <pippin@gimp.org>
Sun, 3 Sep 2017 16:27:49 +0000 (18:27 +0200)
babl/babl-internal.h
babl/babl.h

index ca65279614bb28e88528000eb083700d15fbd062..fcdfe166443cb0cb82424990b071b73bc21cc2b2 100644 (file)
@@ -370,4 +370,58 @@ const Babl *babl_space_match_trc_matrix (const Babl *trc_red,
                                          float gx, float gy, float gz,
                                          float bx, float by, float bz);
 
+/**
+ * babl_space_from_chromaticities:
+ *
+ * Creates a new babl-space/ RGB matrix color space definition with the
+ * specified CIE xy(Y) values for white point: wx, wy and primary
+ * chromaticities: rx,ry,gx,gy,bx,by and TRCs to be used. After registering a
+ * new babl-space it can be used with babl_space() passing its name;
+ *
+ * Internally this does the math to derive the RGBXYZ matrix as used in an ICC
+ * profile.
+ */
+const Babl * babl_space_from_chromaticities (const char *name,
+                                             double wx, double wy,
+                                             double rx, double ry,
+                                             double gx, double gy,
+                                             double bx, double by,
+                                             const Babl *trc_red,
+                                             const Babl *trc_green,
+                                             const Babl *trc_blue);
+
+/**
+ * babl_space_from_rgbxyz_matrix:
+ *
+ * Creates a new RGB matrix color space definition using a precomputed D50
+ * adapted 3x3 matrix and associated CIE XYZ whitepoint, as possibly read from
+ * an ICC profile.
+ */
+const Babl *
+babl_space_from_rgbxyz_matrix (const char *name,
+                               double wx, double wy, double wz,
+                               double rx, double gx, double bx,
+                               double ry, double gy, double by,
+                               double rz, double gz, double bz,
+                               const Babl *trc_red,
+                               const Babl *trc_green,
+                               const Babl *trc_blue);
+
+/**
+ * babl_trc_gamma:
+ *
+ * Creates a Babl TRC for a specific gamma value, it will be given
+ * a name that is a short string representation of the value.
+ */
+const Babl * babl_trc_gamma (double gamma);
+
+/**
+ * babl_trc:
+ *
+ * Look up a TRC by name, "sRGB" "1.0" "linear" and "2.2" are recognized
+ * strings in a stock babl configuration.
+ */
+const Babl * babl_trc       (const char *name);
+
+
 #endif
index 01431a0ac920dac06f39775f464547eec1f33593..98f49a91c1adfefedbf16f3791eee634e49cd81f 100644 (file)
@@ -80,67 +80,16 @@ const Babl * babl_component (const char *name);
  */
 const Babl * babl_model     (const char *name);
 
-/**
- * babl_trc:
- *
- * Look up a TRC by name, "sRGB" "1.0" "linear" and "2.2" are recognized
- * strings in a stock babl configuration.
- */
-const Babl * babl_trc       (const char *name);
-
-/**
- * babl_trc_gamma:
- *
- * Creates a Babl TRC for a specific gamma value, it will be given
- * a name that is a short string representation of the value.
- */
-const Babl * babl_trc_gamma (double gamma);
 
 /**
  * babl_space:
  *
  * Returns the babl object representing the specific RGB matrix color
  * working space referred to by name. Babl knows of:
- *    sRGB, Adobe, Apple and ProPhoto
+ *    sRGB, Rec2020, Adobe, Apple and ProPhoto, Widegamut
  */
 const Babl * babl_space (const char *name);
 
-/**
- * babl_space_from_chromaticities:
- *
- * Creates a new babl-space/ RGB matrix color space definition with the
- * specified CIE xy(Y) values for white point: wx, wy and primary
- * chromaticities: rx,ry,gx,gy,bx,by and TRCs to be used. After registering a
- * new babl-space it can be used with babl_space() passing its name;
- *
- * Internally this does the math to derive the RGBXYZ matrix as used in an ICC
- * profile.
- */
-const Babl * babl_space_from_chromaticities (const char *name,
-                                             double wx, double wy,
-                                             double rx, double ry,
-                                             double gx, double gy,
-                                             double bx, double by,
-                                             const Babl *trc_red,
-                                             const Babl *trc_green,
-                                             const Babl *trc_blue);
-
-/**
- * babl_space_from_rgbxyz_matrix:
- *
- * Creates a new RGB matrix color space definition using a precomputed D50
- * adapted 3x3 matrix and associated CIE XYZ whitepoint, as possibly read from
- * an ICC profile.
- */
-const Babl *
-babl_space_from_rgbxyz_matrix (const char *name,
-                               double wx, double wy, double wz,
-                               double rx, double gx, double bx,
-                               double ry, double gy, double by,
-                               double rz, double gz, double bz,
-                               const Babl *trc_red,
-                               const Babl *trc_green,
-                               const Babl *trc_blue);
 /**
  * babl_space_from_icc:
  *